<?php
/**
 * Description of slider
 * 
 * @author anhduc.bkhn
 * @since 09-08-2012 - 07:08:33
 */
?>
<div class="content_slide">
    <div class="first">&nbsp;
        <img src="<?php echo bloginfo('template_url'); ?>/img/left_vertic.png">
    </div>
    <div class="middle">

        <ul>
            <div id="wrap_slide_banner">

                <li class="img_item_slide"><a href="http://www.euromex.com" target="_blank"><img src="<?php echo bloginfo('template_url'); ?>/img/logo_euromex.png"/></a></li>
                <li class="img_item_slide"><a href="http://www.astell.com/" target="_blank"><img src="<?php echo bloginfo('template_url'); ?>/img/logo_astell.png"/></a></li>
                <li class="img_item_slide"><a href="http://www.deltaohm.com/ver2010/uk/index.php" target="_blank"><img src="<?php echo bloginfo('template_url'); ?>/img/logo_delta.png"/></a></li>
                <li class="img_item_slide"><a href="http://www.operon.co.kr/en/index.html" target="_blank"><img src="<?php echo bloginfo('template_url'); ?>/img/logo_gperon.png"/></a></li>
                <li class="img_item_slide"><a href="http://www.alpco.co.jp/" target="_blank"><img src="<?php echo bloginfo('template_url'); ?>/img/logo_alp.png"/></a></li>

                <li class="img_item_slide"><a href="http://www.lec.co.uk/" target="_blank"><img src="<?php echo bloginfo('template_url'); ?>/img/logo-lec.png"/></a></li>
                <li class="img_item_slide"><a href="http://www.honeywellsafety.com/Asia/Home.aspx" target="_blank"><img src="<?php echo bloginfo('template_url'); ?>/img/logo_honeywell.png"/></a></li>
                <li class="img_item_slide"><a href="http://www.hund.de" target="_blank"><img src="<?php echo bloginfo('template_url'); ?>/img/logo_hund.png"/></a></li>
                <li class="img_item_slide"><a href="http://www.idexx.com" target="_blank"><img src="<?php echo bloginfo('template_url'); ?>/img/logo_indexx.png"/></a></li>

                <li class="img_item_slide"><a href=" http://jsresearch.co.kr" target="_blank"><img src="<?php echo bloginfo('template_url'); ?>/img/logo_jsr.png"/></a></li>
                <li class="img_item_slide"><a href="http://www.labnetinternational.com" target="_blank"><img src="<?php echo bloginfo('template_url'); ?>/img/logo_labnet.png"/></a></li>
                <li class="img_item_slide"><a href="www.palintest.com" target="_blank"><img src="<?php echo bloginfo('template_url'); ?>/img/logo_palintest.png"/></a></li>
                <li class="img_item_slide"><a href="http://www.peqlab.de/wcms/de/index.php" target="_blank"><img src="<?php echo bloginfo('template_url'); ?>/img/logo_peqlab.png"/></a></li>
                <li class="img_item_slide"><a href="http://www.purite.com/index.php/en/" target="_blank"><img src="<?php echo bloginfo('template_url'); ?>/img/logo_purite.png"/></a></li>
            </div>
        </ul>



    </div>
    <div class="last">&nbsp;
        <img src="<?php echo bloginfo('template_url'); ?>/img/right_vertic.png">
    </div>
    <script type="text/javascript">
        /*
         * div middle rong 654px
         * kich thuoc moi anh la 172x39
         * Moi anh margin-right 34px
         * anh dau tien cach mep 34px
         * Moi click se dich div moddel 34px
         */
        
        var _number_of_slide_banner=$('.img_item_slide').length;
        var _xwidth_slide=_number_of_slide_banner*172+(_number_of_slide_banner-2)*34;
        var _count_click_slide=0;
        var _flag_LEFT_OR_RIGHT=0; // 0 sang trai,  1 sang phai                
                        
        $("#wrap_slide_banner").css('width',_xwidth_slide+'px');
        
        function change_banner(){
            if (_flag_LEFT_OR_RIGHT==0) { //neu sang trai
            if (_count_click_slide < _number_of_slide_banner -3) {
                _count_click_slide+=1;
                var _shiftleft=_count_click_slide*206;
                $("#wrap_slide_banner").animate({
                    'margin-left': -_shiftleft+'px'}
                ,1000);
            }
            if(_count_click_slide==_number_of_slide_banner -3){
                _flag_LEFT_OR_RIGHT=1;
            }
        }
        if (_flag_LEFT_OR_RIGHT==1) {//neu sang phai
            if (_count_click_slide >0) {
                _count_click_slide-=1;
                var _shiftleft=_count_click_slide*206;
                $("#wrap_slide_banner").animate({
                    'margin-left': -_shiftleft+'px'}
                ,1000);
            }
            if(_count_click_slide==0){
                _flag_LEFT_OR_RIGHT=0;
            }
        }
       
            setTimeout(function(){change_banner();},1500);
        }
        
        change_banner();
        /*
         * Moi click se dich sang phai 172+34 pxzzzzzzzz
         * neu _count_click_slide = 0 thi dung
         */
        $(".last").click(function(){
            if (_count_click_slide >0) {
                _count_click_slide-=1;
                var _shiftleft=_count_click_slide*206;
                $("#wrap_slide_banner").animate({
                    'margin-left': -_shiftleft+'px'}
                ,1000);
            }
        });
                        
        /*
         * moi click se dich sang trai 172+34 px
         * 
         */
        $(".first").click(function(){
                            
            if (_count_click_slide < _number_of_slide_banner -3) {
                _count_click_slide+=1;
                var _shiftleft=_count_click_slide*206;
                $("#wrap_slide_banner").animate({
                    'margin-left': -_shiftleft+'px'}
                ,1000);
            }

        });
    </script>
</div>
<?php
/**
 * End of slider
 */